from django.db import models

# Create your models here.
class UserMobile(models.Model):
    name = models.CharField(max_length=128,verbose_name='用户名')
    password = models.CharField(max_length=128,verbose_name='密码')
    mobile = models.CharField(max_length=11,verbose_name='手机号')

    class Meta:
        db_table = 'user'
        verbose_name_plural = '用户表'

    def __str__(self):
        return self.name

class TravelMobile(models.Model):
    line = models.CharField(max_length=32,verbose_name='线路名称')
    circuit = models.CharField(max_length=256,verbose_name='线路描述')
    price = models.DecimalField(max_digits=7,decimal_places=2,verbose_name='线路价格')

    class Meta:
        verbose_name_plural = '路线表'

    def __str__(self):
        return self.line